home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
bbs
/
tmg105b2.zip
/
EXTERNAL.DOC
< prev
next >
Wrap
Text File
|
1996-08-03
|
24KB
|
427 lines
EXTERNAL.DOC Page 1
╒═════════════════════════════════════════════════════════════════════════╕
│ The Magic Gate version 1.05 │
│ Documentation August '96 │
│ (C) Copyright 1995, 1996 All Rights Reserved │
│ Joseph O'Connor │
╘═════════════════════════════════════════════════════════════════════════╛
This game may be distributed in its original, unmodified form as
long as no money is made off of it. Please do not include the contents
of this archive in any CD, collection, or whatever without express written
permission of ME!
This file was written for all you code-heads out there who are interested
in writing an external module for TMG. This will document all the
structures for the various things in TMG as well as giving insight into how
to put new EXMODS into the game. If you're a code-junkie like me, and want
to write your own thing for everything, then this is the file you need to
get started.
─═════════════════════════════════════════════════════════════════════════─
Introduction:
If the TMGSL is not powerful enough for you, or you need to do something
totally different in your EXMOD, you should have the ammunition you need
to get writing the code after reading this file. You will learn the format
of the drop file as well as the method for adding your EXMOD to the
EXMODS.DAT file as well (which is just as useful for scripts). Even if you
don't plan on writing an EXMOD, this file will contain some techie stuff
you might be interested in.
EXTERNAL.DOC Page 2
─═════════════════════════════════════════════════════════════════════════─
Constants in the game:
Oh geez, there are about a million constants in this program. Mainly
because its so much easier to remember CLASS_MAGE then it is to remember if
mages were 2 or 8. Not all of these will apply 100% to each and every
EXMOD, but some of them will be vital to understanding the values of some
of the fields.
Go figure, well, anyway, here is a list of constants that relate to file
names.
CHAR_FILE='PLAYERS.DAT'; This file has all the player data
GUILD_FILE='GUILDS.DAT'; This file has all the guilds data
STAT_FILE='MAGISTAT.DAT'; This contains the configuration for the
game, such things as costs etc.
MENU_TEXT_FILE='MAGITEXT.DAT'; This has all the menus and unchanging text
HOLD_FILE='HOLD.DAT'; This is used to tell any running copies not
to access the disk drive temporarily
WEAPON_FILE='WEAPONS.DAT'; This file contains data for all the weapons
ARMOR_FILE='ARMORS.DAT'; This file contains data for all the armors
SHIELD_FILE='SHIELDS.DAT'; This file contains data for all the shields
GRANK_ANS_FILE='GRANK.ANS'; This file contains the ANSI guild ranks
GRANK_ASC_FILE='GRANK.ASC'; This file contains the ASCII guild ranks
PRANK_ANS_FILE='PRANK.ANS'; This file contains the ANSI player ranks
PRANK_ASC_FILE='PRANK.ASC'; This file contains the ASCII player ranks
These constants should be used for any call to open, close, read whatever
it is you want to do to the file cause it will make your life a lot easier
if I ever decide to change a file name ;)
Alright, moving along, next we have all the possible flags that can affect
the character and are stored in the main_char^.char_flags long integer.
These determine the actions that the character has performed and determine
which cans can still be performed if the oppurtunity arises.
FLAGS_SHAMED_MASTER=1; This flag is set if the character attacks
another character with the same master.
FLAGS_MASTER_IGNORES=2; This flag is set if the master will not do
anything for the character today.
FLAGS_EXPERT_MODE=4; Are menus shown to the player?
FLAGS_LOUIS_THWARTED=8; Louis has stopped the character from trying
to break into the inn. All further attempts
are automatic failures that day.
FLAGS_FOUND_GATE=16; Have they found the magic gate that day?
FLAGS_ENTERED_GATE=32; Did they enter the gate that day?
FLAGS_HAS_BOW=64; Does the character have a bow and arrow?
FLAGS_HUNTED=128; Has a hit been put out on this character?
FLAGS_SEEN_SHADY=256; Have they seens Shady today?
FLAGS_CHAR_DRUNK=512; Did the character have one too many in the bar?
FLAGS_MET_TRAVELLER=1024; Have they visited the Sage today?
FLAGS_DAILY_SECRET_1=2048; Secret little things...
FLAGS_DAILY_SECRET_2=4096; Secret little things...
FLAGS_DAILY_SECRET_3=8192; Secret little things...
FLAGS_DAILY_SECRET_4=16384; Secret little things...
EXTERNAL.DOC Page 3
─═════════════════════════════════════════════════════════════════════════─
Default values:
The following are only used if there is no STAT_FILE. They are the defaults
that will be written to the stat file. They're just sort of here for you
to look at.
DEFAULT_GRACE=15;
DEFAULT_RESURRECT=2;
DEFAULT_FIGHTS=25;
DEFAULT_PFIGHTS=3;
DEFAULT_MTRANSFER=10000;
DEFAULT_NTRANSFER=3;
DEFAULT_ATRANSFER=TRUE;
DEFAULT_BANK_RATE=6.00;
DEFAULT_HEAL_COST=4;
DEFAULT_INN_COST=300;
DEFAULT_DEATH_LOSE_EXP=10;
DEFAULT_MOB_GOLD_MULT=1.20;
DEFAULT_MOB_EXP_MULT=0.85;
DEFAULT_MAX_GUILDS=5;
─═════════════════════════════════════════════════════════════════════════─
Deciphering the Class variable:
The next group of constants show the bits that correspond to each of the
six classes as they are in the main_char^.class integer. They are vital
to knowing what the characters capabilities are.
CLASS_WARRIOR = 1;
CLASS_MAGE = 2;
CLASS_THIEF = 4;
CLASS_HEALER = 8;
CLASS_RANGER = 16; <--+-These two were reversed in previous versions.
CLASS_PALADIN = 32; <-+
MASTERED_WARRIOR = 64;
MASTERED_MAGE = 128;
MASTERED_THIEF = 256;
MASTERED_HEALER = 512;
MASTERED_RANGER = 1024;<--+-These two were reversed in previous versions.
MASTERED_PALADIN = 2048; <-+
EXTERNAL.DOC Page 4
─═════════════════════════════════════════════════════════════════════════─
Limits in TMG:
The following constants are used in my records to limit the number of chars
in the field, so I gave them all names that are easy to remember.
SHORT_LENGTH=20;
MED_LENGTH=40;
MAX_LENGTH=86;
DESC_LENGTH=100;
The next few constants are limits on the game as far as what would unbalance
it. These numbers have been toyed and tinkered with from the start and they
are just about right for most any game now.
MAX_WEAPONS=14; Number of different ARMORS,WEAPONS and SHIELDS
MAX_LEVELS=20; Total number of levels in the game.
MAX_DAMAGE_REDUCTION=87; How little damage can you possibly deflect?
MAX_LUCK=30; Luck modifies quite a few things, and the
higher it goes, the easier it is to do well.
MOB_CATCH_CHANCE=20; {MBL} Determines at what percentage a monster
will attack you when you try to flee from it.
BONUS_HIT_CHANCE=8; {MBL} How often do you or the mob strike for
extra damage?
SKILL_GAIN_LEVEL=5; The number of percentage points you gain when
you raise a level in your class.